package com.tony.multipledatasource.service.impl;

import com.tony.multipledatasource.dao.StudentDao;
import com.tony.multipledatasource.entity.Student;
import com.tony.multipledatasource.service.StudentService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Xuxiaoyu
 * @Description
 * @createTime 2024/4/11 下午4:39:56
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Resource
    private StudentDao studentDao;

    @Override
    public List<Map<String, Object>> getAllStudentsMapByMySql() {
        return studentDao.getAllStudentsMapByMySql();
    }

    @Override
    public List<Map<String, Object>> getAllStudentsMapByOracle() {
        return studentDao.getAllStudentsMapByOracle();
    }

    @Override
    public List<Student> getAllStudentsBeanByMySql() {
        return studentDao.getAllStudentsBeanByMySql();
    }

    @Override
    public List<Student> getAllStudentsBeanByOracle() {
        return studentDao.getAllStudentsBeanByOracle();
    }

    @Override
    public Student getStudentBySnoWithMySql(String sno) {
        return studentDao.getStudentBySnoWithMySql(sno);
    }

    @Override
    public Student getStudentBySnoWithOracle(String sno) {
        return studentDao.getStudentBySnoWithOracle(sno);
    }
}
